package com.billsystem.service;

import com.billsystem.mapper.AccountMapper;
import com.billsystem.pojo.Account;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountService {

    @Autowired
    private AccountMapper accountMapper;

    public void addAccount(Account account){
        accountMapper.addAccount(account);
    }

    public void deleteAccount(Account account){
        accountMapper.deleteAccount(account);
    }


    public Account queryAccount(int id){
        return accountMapper.queryAccount(id);
    }

    public List<Account> queryListByUid(int uid){
        return accountMapper.queryListByUid(uid);
    }

    public void updateAccount(Account account){
        accountMapper.updateAccount(account);
    }

}
